package com.dynabook.ems.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 盘点数据分页查询请求
 * @author tester
 */
@Data
@ApiModel(value = "盘点数据分页查询请求", description = "用于查询盘点数据的分页请求参数")
public class InventoryDataPageRequest implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 开始日期
     */
    @ApiModelProperty(value = "开始日期", example = "2025-01-01", required = true)
    @NotBlank(message = "开始日期不能为空")
    private String startDate;
    
    /**
     * 结束日期
     */
    @ApiModelProperty(value = "结束日期", example = "2025-10-27", required = true)
    @NotBlank(message = "结束日期不能为空")
    private String endDate;
    
    /**
     * 页码（从1开始）
     */
    @ApiModelProperty(value = "页码", example = "1", required = true)
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码必须大于0")
    private Integer pageNum;
    
    /**
     * 每页大小
     */
    @ApiModelProperty(value = "每页大小", example = "100", required = true)
    @NotNull(message = "每页大小不能为空")
    @Min(value = 1, message = "每页大小必须大于0")
    private Integer pageSize;
    
    /**
     * 查询类型：1=平均单耗BOM, 2=盘点库存
     */
    @ApiModelProperty(value = "查询类型", example = "1", required = true, 
            allowableValues = "1,2", 
            notes = "1=平均单耗BOM(averageUnitConsumption), 2=盘点库存(countingInventory)")
    @NotNull(message = "查询类型不能为空")
    @Min(value = 1, message = "查询类型必须为1或2")
    private Integer type;
}

